import React, { Component } from 'react';
import myentry from '../styles/myentry.scss';
import pic1 from '../assets/MyEntryPic/01.gif'
import pic2 from '../assets/MyEntryPic/02.gif'
import pic3 from '../assets/MyEntryPic/03.gif'
import pic4 from '../assets/MyEntryPic/04.gif'
import pic5 from '../assets/MyEntryPic/05.gif'
import pic6 from '../assets/MyEntryPic/06.gif'
import pic7 from '../assets/MyEntryPic/07.gif'
import pic8 from '../assets/MyEntryPic/08.gif'
import pic9 from '../assets/MyEntryPic/09.gif'
import pic10 from '../assets/MyEntryPic/10.gif'

class MyEntry extends Component {
    constructor(props) {
        super(props);
        this.state = { //state中保存的值就是组件的状态
            list: [
                { pic: pic1, text: '护肤' },
                { pic: pic2, text: '彩妆' },
                { pic: pic3, text: '香氛' },
                { pic: pic4, text: '进口酒' },
                { pic: pic5, text: '国产酒' },
                { pic: pic6, text: '精品奢货' },
                { pic: pic7, text: '食品百货' },
                { pic: pic8, text: '母婴专区' },
                { pic: pic9, text: '直播专区' },
                { pic: pic10, text: '特卖专场' },
            ]
        }
    }
    render() {
        return (
            <div className='list'>
                {
                    this.state.list.map((item, index) => {
                        return (
                            <div className="item" key={index}>
                                <img src={item.pic} alt="" />
                                <div className="text">{item.text}</div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default MyEntry;